package gr.handmademarket.ui.modals;

import gr.handmademarket.ui.panels.RegisterPanel;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow;

/**
 * modal window for registration. 
 */
public class RegisterModal 
extends ModalWindow{

	/**
	 * serialVersionUID.
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * Creates a new RegisterModal object. 
	 *
	 * @param id
	 */
	@SuppressWarnings("nls")
	public RegisterModal(String id) {
		super(id);
		RegisterPanel registerPanel = new RegisterPanel(this.getContentId());
		setContent(registerPanel);
		this.setTitle("Create an account");
		this.setInitialHeight(300);
		this.setInitialWidth(500);
		this.setResizable(true);
		this.setWindowClosedCallback(new WindowClosedCallback(){
			private static final long serialVersionUID = 1L;

			public void onClose(AjaxRequestTarget target){
				ModalUtils.closeCallback(RegisterModal.this, target);
			}
		});
	}	
	
}
